# -*- coding: utf-8 -*-
from django import forms




class CPFWidget (forms.TextInput):
    def __init__(self, *args, **kwargs):
        attrs = kwargs.setdefault('attrs',{})
        attrs['size'] = 14
        attrs['class'] = 'CPFMask'
        super(CPFWidget, self).__init__(*args, **kwargs)

    class Media:
        js = (
            '/media/js/jquery.js',
            '/media/js/jquery.maskedinput.js',
            '/media/js/mask.js',
        )




class CNPJWidget (forms.TextInput):
    def __init__(self, *args, **kwargs):
        attrs = kwargs.setdefault('attrs',{})
        attrs['size'] = 18
        attrs['class'] = 'CNPJMask'
        super(CNPJWidget, self).__init__(*args, **kwargs)

    class Media:
        js = (
            '/media/js/jquery.js',
            '/media/js/jquery.maskedinput.js',
            '/media/js/mask.js',
        )




class CEPWidget (forms.TextInput):
    def __init__(self, *args, **kwargs):
        attrs = kwargs.setdefault('attrs',{})
        attrs['size'] = 9
        attrs['class'] = 'CEPMask'
        super(CEPWidget, self).__init__(*args, **kwargs)

    class Media:
        js = (
            '/media/js/jquery.js',
            '/media/js/jquery.maskedinput.js',
            '/media/js/mask.js',
        )




class PhoneWidget (forms.TextInput):
    def __init__(self, *args, **kwargs):
        attrs = kwargs.setdefault('attrs',{})
        attrs['size'] = 14
        attrs['class'] = 'PhoneMask'
        super(PhoneWidget, self).__init__(*args, **kwargs)

    class Media:
        js = (
            '/media/js/jquery.js',
            '/media/js/jquery.maskedinput.js',
            '/media/js/mask.js',
        )




class DateWidget (forms.TextInput):
    def __init__(self, *args, **kwargs):
        attrs = kwargs.setdefault('attrs',{})
        attrs['size'] = 10
        attrs['class'] = 'DateMask'
            
        super(DateWidget, self).__init__(*args, **kwargs)

    class Media:
        js = (
            '/media/js/jquery.js',
            '/media/js/jquery.maskedinput.js',
            '/media/js/mask.js',
        )
